function sf(){document.form1.q.focus();}
function g(url){var url;location.href=url;}
function hpg(obj,url){obj.style.behavior='url(#default#homepage)';obj.setHomePage(url);}

var mouseon=false; 

function fd()
{
var begin=new Date();var beginf; var end= new Date();var d=begin.getDate();
var endf=end.getYear().toString()+"-"+(end.getMonth()+1).toString()+"-"+end.getDate().toString();
   switch(form1.dt.value)
   {
   case "0":
   begin=null;   
   break;
   case "1":  
   begin.setDate(d-3);   
   break; 
   case "2":  
   begin.setDate(d-7);
   break;
   case "3": 
   begin.setDate(d-30);
   break;
   case "4": 
    begin.setDate(d-91);
   break;   
   } 
if (begin!=null){
  beginf=begin.getYear().toString()+"-"+(begin.getMonth()+1).toString()+"-"+begin.getDate().toString();
  var dat=beginf+"|"+endf;
  form1.range.value=dat;
}else
{
form1.range.value="";
}
}
var adopen=false;
var adopen111=false;
function ad()
{
 if (adopen)
 {
 asp.style.display="none";
 }else
 {
  asp.style.display="";
 }
 adopen=!adopen;
}
function ad111()
{
 if (adopen111)
 {
 asp111.style.display="none";
 }else
 {
  asp111.style.display="";
 }
 adopen111=!adopen111;
}

var timer = null;
var qv=""; 
var np=0;
var datas=[];


function popup(object,sender) {
list = object ;
    list.style.display = "";	 
	list.style.width=sender.offsetWidth;
}	 
function CloseMenu()
{
if (!mouseon){
    var ele = document.getElementById("r");
	p.style.border="1px solid white"; 
	ele.innerHTML="";	  
    p.style.visibility="hidden";
	}
}
function changeSearch() {

    var id_str=document.getElementById('select').value;
    var terms=document.getElementById('seek1').value;
    var search_href="http://so.netsun.com/web/trade.htm?terms="+terms;
    
    if(id_str=="sy1")
       search_href="http://so.netsun.com/web/trade.htm?terms="+terms;
    else if(id_str=="sy2")
    	 search_href="http://www.netsun.com/Q/index.cgi?terms="+terms;
    else if(id_str=="sy3")
    	 search_href="http://so.netsun.com/web/comp.htm?terms="+terms;
    else if(id_str=="sy4")
    	 search_href="http://so.netsun.com/web/forum.htm?c=text&terms="+terms;
    else if(id_str=="sy5")
    	 search_href="http://so.netsun.com/web/news.htm?terms="+terms;
    else if(id_str=="sy6")
    	 search_href="http://so.netsun.com/web/prod.htm?terms="+terms;
    else if(id_str=="sy7")
    	 search_href="http://so.netsun.com/web/expo.htm?terms="+terms;
    else if(id_str=="sy8")
    	 search_href="http://search.netsun.com/search.jsp?s=1&c=1&query="+terms;
    //window.open(search_href,'newwind2');
    document.getElementById('form1').action=search_href;
    document.form1.submit();
  
   // alert(document.getElementById('form1').action);
}                                                  